source 'https://github.com/CocoaPods/Specs.git'

platform :ios, '9.0'

use_frameworks!

target "jiaoyi" do
    pod 'Alamofire', '~> 4.7.3'
    pod 'Moya', '~> 11.0.2'
    pod 'IQKeyboardManagerSwift', '~> 6.1.0'
    pod 'Kingfisher', '~> 4.8.0'
    pod 'R.swift'
#    pod 'Eureka', '~> 4.2.0'
    pod 'Socket.IO-Client-Swift', '~> 13.3.0'
    pod 'KRProgressHUD'
    pod 'Refresher'
    pod 'FSPagerView'
    pod 'PPBadgeViewSwift'
    pod 'SwiftyDrop', '~>4.0'
    pod 'UIAlertController+Blocks', '~> 0.9.2'
    pod 'MJRefresh'
#    pod 'YNPageViewController', '~> 0.1.8'
    pod 'SnapKit', '~> 4.0.0'
#    pod 'Schedule'
    pod 'SDWebImage'
    pod 'YJBannerView'
    pod 'ZSDropDownMenu'
    pod 'SwiftyJSON', '~> 4.1.0'
    pod 'Toast', '~> 4.0.0'
    pod 'ObjectMapper', '~> 3.3.0'
    pod 'UITextView+Placeholder', '~> 1.2.1'
    pod 'CLImagePickerTool', :git => 'https://github.com/Darren-chenchen/CLImagePickerTool.git'
#    pod 'Base64'
    pod 'GTMBase64', '~> 1.0.1'
#    pod 'TTADataPickerView'
    pod 'WSTagsField'
    pod 'PGDatePicker'
    pod 'GuidePageView'
    pod 'JWTDecode', '~> 2.1'
#    pod 'YNDropDownMenu', '~> 3.0.3'
#    pod 'EmptyDataSet-Swift', '~> 4.2.0'
    pod 'BTNavigationDropdownMenu'
end

swift_32 = []
swift_42 = ['KRProgressHUD','KRActivityIndicatorView','SwiftyDrop','YNDropDownMenu']

post_install do |installer|
    installer.pods_project.targets.each do |target|
        swift_version = nil
        if swift_32.include?(target.name)
            print "set pod #{target.name} swift version to 3.2\n"
            swift_version = '3.2'
        end
        
        if swift_42.include?(target.name)
            print "set pod #{target.name} swift version to 4.2\n"
            swift_version = '4.2'
        end
        
        if swift_version
            target.build_configurations.each do |config|
                config.build_settings['SWIFT_VERSION'] = swift_version
            end
        end
    end
end
